import {baseURL} from '@/config/env';
export function optionInfo() {
  return {
    indexLabel: '序号',
    index: true,
    addBtn:false,
    align: 'centenr',
    delBtn: true,//行内删除按钮
    viewBtn:false,//查看按钮
    editBtn:false,
    viewTitle:'详情',
    // rowKey:行数据的Key的主键，用于其他相关操作
    excelBtn: false,//导出excel
    // menuWidth:操作菜单栏的宽度
    labelWidth: 150,
    searchMenuPosition:'right',
    filterBtn:true,
    column: [
      {
        label: '编号',
        prop: 'publicity_number',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
        search:true
      },
      {
        label: '公示名称',
        prop: 'publicity_name',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
        search:true
      },
      {
        label: '类别',
        prop: 'publicity_type',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
        search:true
      },
      {
        label: '公示内容',
        prop: 'publicity_data',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
        search:false,
        hide:true
      },
      {
        label: '发布时间',
        prop: 'publicity_time',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
        search:true,
        type: "date",
        format: "yyyy-MM-dd",
        valueFormat: "yyyy-MM-dd",
      },
      {
        label: '备注',
        prop: 'remarks',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
      },
    ]
    
  }
}
export function optionInfoForm() {
  return {
    menuPosition:'right',
    column: [
      {
        label: '公示名称',
        prop: 'publicity_name',
        addDisplay: false,
        align: 'center',
        rules: [{
          required: true,
          message: "请输入公示名称",
          trigger: "blur"
        }]
      },
      {
        label: '类别',
        prop: 'publicity_type',
      },
      {
        label: '公示内容',
        prop: 'publicity_data',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        span:24,
        search:false,
        hide:false,
        labelslot:true,
        formslot:true,
        row:true
      },
      {
        label: '备注',
        prop: 'remarks',
        // searchSpan:8,
        addDisplay: false,
        align: 'center',
        editDisabled: true,
        minWidth:130,
        searchSpan:8,
      },
    ]
    
  }
}
export function options(){
  return  {
    //普通图片上传
    action: "/v1/upload",
    customConfig: {},//wangEditor编辑的配置
    props: {
      res: "data",
      url: "url",
      home:baseURL
    },
  }
}